import { createI18n } from 'vue-i18n';
import zhCn from 'element-plus/es/locale/lang/zh-cn'
// 本地语言包
import enLocale from "./package/en";
import zhCnLocale from "./package/zh-cn";

const messages = {
    "zh-cn": {
        ...zhCn,
        message:{
           ...zhCnLocale 
        },
    },
    en: {
        ...enLocale,
    },
};

const i18n = createI18n({
    legacy: false,
    locale: 'zh-cn',
    fallbackLocale: 'zh-cn',
    messages,
    silentTranslationWarn: true, // 去除国际化警告
});

export default i18n;